angular.module('mamApp', ["ui.router", "ui.bootstrap", "ui.select", "ngSanitize", "ngAnimate", "ngLocale", 's.pagination', 'angularFileUpload', 'ngLocale','w5c.validator','ngImgCrop','ui.event','ui.sortable'])
    .config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function ($stateProvider, $urlRouterProvider, $locationProvider) {
        $stateProvider.state('login', {
            url: "/login",
            views: {
                "container": {
                    templateUrl: "templates/userCenter/login.html",
                    controller: 'loginController'
                }
            }
        }).state('user', {
            url: "/user",
            views: {
                "container": {
                    templateUrl: "templates/userCenter/user.html",
                    controller: 'loginController'
                }
            }
        }).state('user.sign', {
            url: "/sign?step&mailCheck",
            views: {
                "container": {
                    templateUrl: "templates/userCenter/sign.html",
                    controller: 'userSignController'
                }
            }
        }).state('user.backPassword', {
            url: "/backPassword?step&mailCheck",
            views: {
                "container": {
                    templateUrl: "templates/userCenter/backPassword.html",
                    controller: 'userBackPasswordController'
                }
            }
        }).state('main', {
            url: "/main",
            views: {
                "container": {
                    templateUrl: "templates/main.html",
                    controller: 'mainController'
                }
            }
        }).state('main.home', {
            url: "/home",
            views: {
                "container": {
                    templateUrl: "templates/home.html",
                    controller: 'homeController'
                }
            }
        }).state('main.success', {
            url: "/success",
            views: {
                "container": {
                    templateUrl: "templates/success.html"
                }
            }
        }).state('main.test', {
            url: "/test",
            views: {
                "container": {
                    templateUrl: "templates/test.html",
                    controller: 'testController'
                }
            }
        }).state('main.modifyPassword', {
            url: "/modify-password",
            views: {
                "container": {
                    templateUrl: "templates/modifyPassword.html",
                    controller: 'modifyPasswordController'
                }
            }
        }).state('main.noticeMessage', {
            url: "/notice-message?status&pageNo&pageSize",
            views: {
                "container": {
                    templateUrl: "templates/userCenter/noticeMessage.html",
                    controller: 'noticeMessageController'
                }
            }
        }).state('main.noticeMessage.messageDetail', {
            url: "/message-detail?messageId",
            views: {
                "container": {
                    templateUrl: "templates/userCenter/messageDetail.html",
                    controller: 'messageDetailController'
                }
            }
        }).state('main.noticeMessage.noticeDetail', {
            url: "/notice-detail?noticeId",
            views: {
                "container": {
                    templateUrl: "templates/userCenter/noticeDetail.html",
                    controller: 'noticeDetailController'
                }
            }
        }).state('main.personalInformation', {
            url: "/personal-information",
            views: {
                "container": {
                    templateUrl: "templates/accountCenter/personalInformation.html",
                    controller: 'personalInformationController'
                }
            }
        }).state('main.programme', {
            url: "/programme?status&albumId&programId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/programme.html",
                    controller: 'programmeController'
                }
            }
        }).state('main.album', {
            url: "/album?pageNo&pageSize&reviewStatus&keyword",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/album.html",
                    controller: 'albumController'
                }
            }
        }).state('main.album.create', {
            url: "/create",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/albumCreate.html",
                    controller: 'albumCreateController'
                }
            }
        }).state('main.album.edit', {
            url: "/edit?albumId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/albumEdit.html",
                    controller: 'albumEditController'
                }
            }
        }).state('main.album.detail', {
            url: "/detail?albumId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/albumDetail.html",
                    controller: 'albumEditController'
                }
            }
        }).state('main.album.info', {
            url: "/info?albumId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/albumInfo.html",
                    controller: 'albumInfoController'
                }
            }
        }).state('main.album.info.programmeDetail', {
            url: "/programme-detail?programId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/programmeDetail.html",
                    controller: 'programmeEditController'
                }
            }
        }).state('main.album.info.programmeEdit', {
            url: "/programme-edit?programId",
            views: {
                "container": {
                    templateUrl: "templates/contentCenter/programmeEdit.html",
                    controller: 'programmeEditController'
                }
            }
        }).state('main.contentStatistics', {
            url: "/content-statistics",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/contentStatistics.html",
                    controller: 'programmeEditController'
                }
            }
        }).state('main.albumOverview', {
            url: "/album-overview?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/albumOverview.html",
                    controller: 'albumOverviewController'
                }
            }
        }).state('main.playOverview', {
            url: "/play-overview?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/playOverview.html",
                    controller: 'playOverviewController'
                }
            }
        }).state('main.programOverview', {
            url: "/program-overview?pageNo&pageSize&startTime&endTime",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/programOverview.html",
                    controller: 'programOverviewController'
                }
            }
        }).state('main.albumPlay', {
            url: "/album-play?pageNo&pageSize&key&value",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/albumPlay.html",
                    controller: 'albumPlayController'
                }
            }
        }).state('main.albumPlay.albumPlayDetail', {
            url: "/album-play-detail?albumId&startTime&endTime&albumName",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/albumPlayDetail.html",
                    controller: 'albumPlayDetailController'
                }
            }
        }).state('main.programPlay', {
            url: "/program-play?pageNo&pageSize&key&value",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/programPlay.html",
                    controller: 'programPlayController'
                }
            }
        }).state('main.programPlay.programPlayDetail', {
            url: "/program-play-detail?programId&startTime&endTime&programName",
            views: {
                "container": {
                    templateUrl: "templates/dataCenter/programPlayDetail.html",
                    controller: 'programPlayDetailController'
                }
            }
        }).state('main.building', {
            url: "/building",
            views: {
                "container": {
                    templateUrl: "templates/build.html",
                    controller: 'mainController'
                }
            }
        })
        //  其他情况跳转
        $urlRouterProvider.otherwise(function ($injector, $location) {
            window.location = "#/login";
        });

    }])

